package icu.lookyousmileface.controller;

import icu.lookyousmileface.mapper.UserMapper;
import icu.lookyousmileface.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author starrysky
 * @title: UserController
 * @projectName mybaits_plus_final
 * @description: 控制器
 * @date 2021/1/3121:36
 */
@RestController
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping(value = "/selectUser",produces = "application/json;charaste=utf-8")
    public User selectUser(){
        User user = userMapper.selectById(5L);
        return user ;
    }

}
